package main

import (
	"fmt"
	"github.com/astaxie/beego/logs"
)

var lg = logs.NewLogger(1000)

func setLogger() {

	if cfg.Log.Console.Use {
		lg.SetLogger("console", `{"level":`+fmt.Sprint(cfg.Log.Console.LogLevel)+`}`)
	}
	if cfg.Log.File.Use {

		lg.SetLogger("file", `{"level":`+fmt.Sprint(cfg.Log.File.LogLevel)+`,"filename":"`+cfg.Log.File.Name+`"}`)
	}
}
